﻿@model List<SysModule>
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title>决策咨询</title>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" href="~/Content/images/favicon.ico">
    <link rel="stylesheet" href="~/Content/lib/layui/css/layui.css">
    <link href="~/Content/lib/iconfont/iconfont.css" rel="stylesheet" />
    <script type="text/javascript" src="~/Content/lib/layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="~/Content/layuimini/css/layuimini.css" media="all">
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
        .layui-icon {
            display: inline-block;
        }

        .layui-layout-admin .layui-header {
            background-color: #1e9fff !important;
        }

        .layui-layout-admin .layui-footer {
            background-color: #1e9fff !important;
        }
    </style>
    <style id="layuimini-bg-color">
    </style>
</head>
<body class="layui-layout-body layuimini-all">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header">
            <div class="layui-logo">
                <a href="">
                    <img src="/Content/images/logo.png" alt="logo">
                    @*<h1>中储恒科</h1>*@
                </a>
            </div>
            <div class="layuimini-tool"><i title="展开" class="layui-icon layui-icon-shrink-right" data-side-fold="1"></i></div>
            <div class="systitle">国家仓储资源运营平台</div>
            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;" data-refresh="刷新"><i class="layui-icon layui-icon-refresh"></i></a>
                </li>
                @*<li class="layui-nav-item">
                        <a href="javascript:;" data-clear="清理"><i class="layui-icon layui-icon-delete"></i></a>
                    </li>*@
                <li class="layui-nav-item layuimini-setting">
                    <a href="javascript:;">@GlobalSupport.CurrentUser.UserName</a>
                    <dl class="layui-nav-child">
                        @*<dd>
                                <a href="javascript:;" data-id="setting" data-iframe-tab="page/user-setting.html" data-title="基本资料" data-icon="layui-icon layui-icon-username">基本资料</a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-id="password" data-iframe-tab="page/user-password.html" data-title="修改密码" data-icon="layui-icon layui-icon-username">修改密码</a>
                            </dd>*@
                        <dd>
                            <a href="/Home/LoginOut" class="login-out">退出登录</a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item layuimini-select-bgcolor layui-hide-xs">
                    <a href="javascript:;" id="selectTheme" title="选择主题" data-bgcolor="选择主题"><i class="layui-icon layui-icon-theme"></i></a>
                </li>
            </ul>
        </div>

        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll layui-left-menu">
                <ul class="layui-nav layui-nav-tree layui-left-nav-tree layui-this">
                    @foreach (var level1 in Model.Where(m => m.ParentID != 0))
                    {
                        <li class="layui-nav-item">
                            @if (level1.ModuleType == 0)
                            {
                                <a href="javascript:;" class="layui-menu-tips"><i class="layui-icon @level1.ModuleIcon"></i><span class="layui-left-nav"> @level1.ModuleName</span> <span class="layui-nav-more"></span></a>
                                <dl class="layui-nav-child">
                                    @foreach (var level2 in Model.Where(m => m.ParentID == level1.ID))
                                    {
                                        if (level2.ModuleType == 0)
                                        {
                                            <dd>
                                                <a href="javascript:;" class="layui-menu-tips"><i class="layui-icon @level2.ModuleIcon"></i><span class="layui-left-nav"> @level2.ModuleName</span> <span class="layui-nav-more"></span></a>
                                                <dl class="layui-nav-child">
                                                    @foreach (var level3 in Model.Where(m => m.ParentID == level2.ID))
                                                    {

                                                        <dd>
                                                            <a href="javascript:;" id="menu_@level3.ID" class="layui-menu-tips" data-type="tabAdd" data-tab="@level3.ModuleUrl" target="_self"><i class="@level3.ModuleIcon"></i><span class="layui-left-nav"> @level3.ModuleName</span></a>
                                                        </dd>
                                                    }
                                                </dl>
                                            </dd>
                                        }
                                        else
                                        {
                                            <dd>
                                                <a href="javascript:;" id="menu_@level2.ID" class="layui-menu-tips" data-type="tabAdd" data-tab="@level2.ModuleUrl" target="_self"><i class="layui-icon @level2.ModuleIcon"></i><span class="layui-left-nav"> @level2.ModuleName</span></a>
                                            </dd>
                                        }
                                    }
                                </dl>
                            }
                            else
                            {
                                <a href="javascript:;" id="menu_@level1.ID" class="layui-menu-tips" data-type="tabAdd" data-tab="@level1.ModuleUrl" target="_self"><i class="layui-icon @level1.ModuleIcon"></i><span class="layui-left-nav"> @level1.ModuleName</span></a>
                            }
                        </li>
                    }
                </ul>
            </div>
        </div>

        <div class="layui-body">
            <div class="layui-tab" lay-filter="layuiTab" id="top_tabs_box">
                <ul class="layui-tab-title" id="top_tabs">
                    <li class="" id="tab_home" lay-id="recommend">@*<i class="layui-icon layui-icon-home"></i>*@ <span>首页</span></li>
                </ul>
                <ul class="layui-nav closeBox">
                    <li class="layui-nav-item">
                        <a href="javascript:;"> <i class="layui-icon layui-icon-circle-dot"></i> 页面操作<span class="layui-nav-more"></span></a>
                        <dl class="layui-nav-child">
                            <dd><a href="javascript:;" data-page-close="other"><i class="layui-icon layui-icon-close"></i> 关闭其他</a></dd>
                            <dd><a href="javascript:;" data-page-close="all"><i class="layui-icon layui-icon-close-fill"></i> 关闭全部</a></dd>
                        </dl>
                    </li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <iframe style="width:100%;height:100%;" frameborder="0" src="/Charts/Resource/AreaAnalysis"></iframe>
                    </div>
                </div>
            </div>
            <div class="layui-footer">
                © 2020 - 中储恒科物联网系统有限公司
            </div>
        </div>
    </div>
    <script>
        layui.config({
            base: "/Content/layuimini/js/"
        }).extend({
            layuimini: "layuimini"
        });
        layui.use(['layer', 'layuimini','jquery'], function () {
            var layer = layui.layer;
            var $ = layui.jquery;
            layuimini.init();

            layui.getCurrTab = function () {
                return $($(".layui-tab-item.layui-show").find("iframe")[0]).attr('src');
            }
        });
    </script>
</body>
</html>